package com.wswy.wyjk.ui.practice.exam

import android.arch.lifecycle.LiveData
import com.raft.framework.arch.SingleLiveData
import com.wswy.wyjk.core.App
import com.wswy.wyjk.model.dto.ExamRecord
import com.wswy.wyjk.ui.BasePracticeViewModel

class ExamRecordViewModel : BasePracticeViewModel() {

    private val recordLiveData = SingleLiveData<List<ExamRecord>?>()

    override fun onDataLoaderComplete() {
        super.onDataLoaderComplete()
        //加载数据

        practiceType?.let {
            App.daoSession?.findAllExamRecord(it)?.let {

                recordLiveData.postValue(it)

            }
        }

    }


    fun getRecordLiveData():LiveData<List<ExamRecord>?> = recordLiveData

}